IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'spReportsDocumentsCapturedSummary_Create')
	BEGIN
		PRINT 'Dropping Procedure spReportsDocumentsCapturedSummary_Create'
		DROP  Procedure  spReportsDocumentsCapturedSummary_Create
	END

GO

PRINT 'Creating Procedure spReportsDocumentsCapturedSummary_Create'
GO
CREATE Procedure dbo.spReportsDocumentsCapturedSummary_Create
	( 	  
	  @d_folder varchar(50) = null, 
		@d_loc varchar(50) = null, 
		@d_user varchar(50) = null, 
		@doctype char(50) = null, 
		@d_status varchar(50) = null, 
		@d_datetime DateTime = null, 
		@LOCNO char(10) = null, 
		@FSTATUS char(10) = null, 
		@barcode char(20) = null, 
		@d_accno varchar(50) = null
	)
AS
  /* 
    ------------------------------------------------------------------------------
    - Change History
    - --------------
    - Date          Description
    ------------------------------------------------------------------------------
    - 10/15/2007    Initial version created
    ------------------------------------------------------------------------------
  */

	-- Declare the required variables

	-- Create the required new record
	INSERT INTO ReportsDocumentsCapturedSummary
	  (
		d_folder,
			d_loc,
			d_user,
			doctype,
			d_status,
			d_datetime,
			LOCNO,
			FSTATUS,
			barcode,
			d_accno	  
	  )
	VALUES
	  (
		@d_folder,
			@d_loc,
			@d_user,
			@doctype,
			@d_status,
			@d_datetime,
			@LOCNO,
			@FSTATUS,
			@barcode,
			@d_accno
	  )

	-- Handle any errors
	IF @@ERROR != 0
	BEGIN
		RAISERROR('spReportsDocumentsCapturedSummary_Create: Unable to Insert a new ReportsDocumentsCapturedSummary', 10, 1)
		RETURN
	END

	-- Return the newly created ID
	SELECT	@@IDENTITY AS 'ReportsDocumentsCapturedSummary_ID'

	-- Return to calling method
	RETURN 

GO
